monoids in discrete mathematics